ValidatedFloat

constructor(minValue: Float, maxValue: Float, widgetType: ValidatedNumber.WidgetType = WidgetType.SLIDER)

A validated float number with a default selected from the min of the allowable range.

Author

fzzyhmstrs

Since

0.2.0

Parameters

minValue

Float. the minimum allowed value, inclusive

maxValue

Float. the maximum allowed value, inclusive

widgetType

WidgetType defines what the config GUI widget looks like


constructor(defaultValue: Float)

an unbounded validated float number.

The validation will be limited to ensuring the value de/serializes as a float, since there are no bounds.

The widget type is locked to WidgetType.TEXTBOX

Author

fzzyhmstrs

Since

0.2.0

Parameters

defaultValue

Float. the default value of this wrapper


constructor()

an unbounded validated float number with default of 0f.

The validation will be limited to ensuring the value de/serializes as a float, since there are no bounds.

The widget type is locked to WidgetType.TEXTBOX

Author

fzzyhmstrs

Since

0.2.0


constructor(defaultValue: Float, maxValue: Float, minValue: Float, widgetType: ValidatedNumber.WidgetType = if(maxValue == Float.MAX_VALUE || minValue == -Float.MAX_VALUE) WidgetType.TEXTBOX else WidgetType.SLIDER)

Parameters

defaultValue

Float. the default value of this wrapper

maxValue

Float. the maximum allowed value, inclusive

minValue

Float. the minimum allowed value, inclusive